/****************************************************
	文件：FrameTask.cs
	作者：HuskyT
	邮箱：1005240602@qq.com
	日期：2021/1/10 12:47:57
	功能：帧任务
*****************************************************/

using System;

namespace HTFW.Core
{
    public class FrameTask
    {
        #region 字段

        /// <summary>
        /// 全局ID
        /// </summary>
        public int TID;

        /// <summary>
        /// 目标任务
        /// </summary>
        public Action<int> CallBack;

        /// <summary>
        /// 延迟帧
        /// </summary>
        public double DelayFrame;

        /// <summary>
        /// 目标任务执行帧
        /// </summary>
        public double ActFrame;

        /// <summary>
        /// 循环执行次数（0为无限循环）
        /// </summary>
        public int LoopCount;

        #endregion

        public FrameTask(int tID, Action<int> callBack, double delayFrame, double actFrame, int loopCount)
        {
            TID = tID;
            CallBack = callBack;
            DelayFrame = delayFrame;
            ActFrame = actFrame;
            LoopCount = loopCount;
        }
    }
}